home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / os2 / srefv12i.zip / srefiltr.faq < prev    next >
Text File  |  1997-02-27  |  40KB  |  842 lines

  1. 23 Feb. 1997     SRE-Filter Frequently Asked Questions
  2.  
  3.                -------------------------------------
  4.  
  5. This document answers the following questions:
  6.  
  7. * What is SRE-Filter and GoServe?
  8. * What can SRE-Filter do?
  9. * What does SRE-Filter cost?
  10. * Where can I get SRE-Filter?
  11. * I downloaded SREFV12I.ZIP, how do I install it?
  12. * Can SRE-Filter run under Object REXX.
  13. * How do I configure SRE-Filter?
  14. * Can I edit SRE-Filter's configuration files?
  15.  
  16. * How can I control access to my site?
  17. * How can I use selector specific access controls to control access to a directory?
  18. * What are "client privileges" and "resource privileges" ?
  19. * What's the difference between REALMS and privileges?
  20. * I'm still confused about these privilege things?
  21. * How can I limit the capabilities of different users of our server?
  22. * How can I prevent other web sites from using images stored on our server?
  23.  
  24. * What are the server side include capabilities of SRE-Filter?
  25. * Can I use cookies with GoServe and SRE-Filter?
  26. * I am having trouble with uploads, what should I do?
  27. * What are SRE-Filter's virtual directories?
  28. * How do I redirect a request?
  29. * Can I customize SRE-Filter responses?
  30. * How does SRE-Filter deal with multiple "wildcard" matches?
  31. * How can I record the number of hits I get?
  32. * How can I speed up throughput?
  33. * How do I define new MIME media types?
  34. * How can I prevent NetScape from reloading files too frequently?
  35. * What are the SRE-Filter add-ons?
  36.  
  37. To users of Don Meyer's GoHTTP -- where appropriate, this document notes
  38. the similarities between the two filters.  You might want to pay special
  39. attention to:
  40.     What are "client privileges" and "resource privileges"?
  41.     How do I redirect a request?
  42.     What are SRE-Filter's virtual directories?
  43.     How can I control access to my site?
  44.  
  45.  
  46.                    ------------------------------------------
  47.  
  48.  
  49. *** The basics:
  50.  
  51. * What is SRE-Filter and GoServe?
  52.  
  53.    SRE-Filter is a "filter" for the GoServe OS/2 Internet Server.
  54.    GoServe, an IBM EWS "freeware" product, is an HTTP (web) and Gopher server.
  55.    GoServe requires a "filter", written in REXX, to interpret and process
  56.    requests for resources.  SRE-Filter is one of several such filters.
  57.  
  58. * What  can SRE-Filter do?
  59.  
  60.   In a nutshell:
  61.     SRE-Filter is designed to provide a web server for non-cutting
  62.     edge, small-to-medium load sites being maintained by non-professionals
  63.     who want a fair degree of functionality in an easily maintained system.
  64.  
  65. * What does SRE-Filter cost.
  66.  
  67.   $0.00.  You may freely distribute SRE-Filter, and you may dissect, subsect,
  68.   and otherwise utilize it's source code.  Please be aware of the standard
  69.   "use at own risk" disclaimer, and the fact that SRE-Filter is in NO way
  70.   an official or unofficial product of the U.S government.
  71.  
  72. * Where can I get SRE-Filter
  73.  
  74.   The latest version of SRE-Filter (it's constantly being updated) can be
  75.   found at http://rpbcam.econ.ag.gov/srefilter.
  76.   You can download the whole package (it's almost 1M zipped up), or
  77.   you can download it in several smaller (200-300k) pieces.
  78.  
  79. **** Installing SRE-Filter:
  80.  
  81. * I downloaded SREFV12I.ZIP, how do I install it?
  82.  
  83.    i) Create a temporary directory somewhere on your hard drive,
  84.    ii) Copy SREFV12I.ZIP (or the several "pieces") to this temporary directory
  85.   iii) Using UNZIP, unzip SREFV12I.ZIP (or the several pieces)
  86.   iv) Read the READ.ME file
  87.    v) Run the INSTALL program (type INSTALL from an OS/2 prompt)
  88.  
  89. * Can SRE-Filter run under Object REXX?
  90.  
  91.   SRE-Filter was designed to run under "classic" REXX (technically, REXXSAA).
  92.   If you are interested in using object REXX (as packaged
  93.   with O2/2 Warp "Merlin" 4.0), you will need to download some modifications
  94.   to SRE-Filter. Without these modifications (consisting of about a dozen
  95.   files), SRE-Filter will NOT work under Object REXX.
  96.  
  97.   For details, see the "are you using OBJECT REXX" link on the
  98.   SRE-Filter home page.
  99.  
  100.   At this date (Jan 1997), the "object REXX" modification have not
  101.   been updated to ver 1.2i.  If there is interest in such an update,
  102.   please let me know (DANIELH@ECON.AG.GOV)
  103.  
  104. * How do I configure SRE-Filter?
  105.  
  106.    Most people will probably want to use the built in configurator.
  107.    This configurator is designed to be run via your web brower.
  108.    Assuming you did not make major modifications to SRE-Filter's
  109.    installation defaults, you can just point your web browser at:
  110.            http://your.browser.wherever/configur.htm
  111.    You will then be given the choice between a "simple-mode",
  112.    "intermediate mode", and "expert mode" configurator.  New users
  113.    will probably like the "simple mode" best.
  114.  
  115.    Both the simple and intermediate modes make heavy use of HTML
  116.    FORMS.  The simple mode has a "one, well-documented, form
  117.    per parameter" philosophy.  The intermediate mode has a
  118.    "one, not-so-well-documented, form for a large set of parameters"
  119.    The advantage of the simple mode is ease of use.  The disadvantage
  120.    is that it does not give you access to some of the more obscure
  121.    SRE-Filter parameters.
  122.  
  123.     Hint: If SRE-Filter denies you access to the configurator, you should
  124.           check the OWNERS variable (in INITFILT.80) to make sure it's
  125.           that same as your browser's IP address.  Or, use the
  126.           username/password that the INSTALL procedure asked you to
  127.           supply (or did you skip that part)?
  128.  
  129. * Can I edit SRE-Filter's configuration files?
  130.  
  131.   For those who like to make their changes quickly, you may want
  132.   to directly edit the SRE-Filter configuration files, and not
  133.   bother with the configurator. The configuration files are
  134.   all text (ascii) files, which you can modify with your favorite
  135.   text edtior (such as OS/2's EPM editor).
  136.   The most important configuration files are:
  137.        INITFILT.80, ALIASES.IN, ALL_FILE.CTL, VIRTUAL.IN, and USERS.IN.
  138.   INITFILT.80 is in the GoServe "working" directory (the directory you
  139.   installed SREFILTR.80 to). By default, other configuration files are
  140.   in the DATA/ subdirectory of the GoServe working directory.
  141.  
  142.   If you plan on editing INITFILT.80, you should read INITFILT.DOC first.
  143.   For the other files, pay attention to comments (lines that start
  144.   with a semi-colon) embedded in the default versions of these file -- they
  145.   provide detailed syntax information.
  146.  
  147. *** Some more specific questions:
  148.  
  149. *  How can I control access to my site?
  150.  
  151.    SRE-Filter contains three levels of access controls:
  152.  
  153.    *) LOGON controls: a "can you get into our site" control.
  154.    *) Directory specific: directory specific controls using  HTACCESS files.
  155.    *) Resource specifc: "SEL-specific" access controls contained in the
  156.       ACCESS_FILE (i.e.; data/all_file.ctl).
  157.  
  158.    Logon controls pertain to all requests.  You can tell SRE-Filter
  159.    to check none, some, or all requests for username/password authorization
  160.    (using the BASIC authorization scheme).
  161.  
  162.    For details on "logon controls", see the description of the CHECKLOG,
  163.    OWNERS, INHOUSEIPS, and UNALLOWEDIPS variables in INITFILT.DOC.
  164.    Or, check out the appropriate sections in the "simple mode" configurator.
  165.  
  166.    Of greater interest are the "directory specific" and "SEL-specific"
  167.    access control methods.  The HTACCESS method (using code graciously
  168.    provided by Don Meyer) uses special "HTACCESS" files located in the
  169.    directory (and in the parent directories) of the requested file.
  170.    This (or these) HTACCESS files contain information on who has access
  171.    rights to files in the directory (and in child directories).
  172.  
  173.    In contrast, "SEL-specific" access controls compare the request selector
  174.    against a list of "selectors".  This list (which may contain wildcarded
  175.    entries) dictates who can access these selectors.  Note that, in contrast
  176.    to HTACCESS files, there is one globally maintained list, rather then
  177.    seperate files per directory.
  178.  
  179.         Note that we use the term "SEL-specific" to mean "Selector-specific",
  180.         where the "selector" is the slightly-modified middle portion of
  181.         the client's request string.
  182.         For example, a URL of
  183.               http://foo.bar.net/dir1/redsox.htm
  184.         would generate a request string of
  185.               GET  /dir1/redsox.htm  http/1.0
  186.         which yields a selector of
  187.                    dir1/redsox.htm
  188.         In other words, SEL-specific access controls are
  189.         sensitive to how you code links in your HTML documents.
  190.  
  191.    The choice of method is a matter of taste and convenience -- controlling
  192.    directories is a sure way to prevent access to files, but controlling
  193.    selectors is more flexible.  In fact, these two methods (SEL-specific and
  194.    directory-specific) can be used jointly, which implies multiple checks. But
  195.    be careful when using both methods, it is possible to get stuck in
  196.    authorization loops!
  197.  
  198.    Since "SEL-specific" controls are native to SRE-Filter, they will tend
  199.    to be faster.  Therefore, our recommendation is to use the SEL-specific
  200.    method. If you do go with the "directory-specific" (HTACCESS) method, and
  201.    you want to suppress lookup in the access control file (by setting
  202.    ACCESS_FILE=' '), be aware that you will suppress other SRE-Filter
  203.    options (see the description of the ALLOW_ACCESS paramter in INITFILT.DOC,
  204.    or see the ALL_FILE.CTL file, for a description of these options).
  205.  
  206.    Lastly, to allow unhindered access to selected clients, or to a subset of
  207.    your site, you can use INHOUSEIPS. and PUBLIC_URLS. parameters.
  208.  
  209.     *  You can circumvent access controls for selected server resources by
  210.        by using the PUBLIC_URLS parameters.  When the client's 
  211.        "request selector" matches a PUBLIC_URLS, access controls are not 
  212.        attempted.
  213.  
  214.     *  INHOUSEIPS. parameters are similar to the IDENT method of
  215.        authorization (but INHOUSEIPS. does not obtain or use
  216.        username@ information).  Basically, if a client's IP address
  217.        matches one of a set of "INHOUSEIPS", she is given access
  218.        to the site (though she may still need resource/directory specific
  219.        privileges).  Note that these INHOUSEIPS entries may contain wildcard
  220.        characters.
  221.  
  222.     *  By the way, the simple mode configurator can be used to create,
  223.        and remove  both INHOUSEIPS. and PUBLIC_URLS. (note that the
  224.        PUBLIC_URLS are also called "public areas")
  225.  
  226. * How can I use selector specific access controls to control access to a
  227.   directory?
  228.  
  229.    Since "SEL-specific" can refer to "a set of resources on your server"
  230.    (via the use of the * wildcard), and since selectors typically point
  231.    to directories, "SEL-specific" controls are easily used to control
  232.    access to files in a subdirectory.
  233.  
  234.    A simple example follows:
  235.  
  236.    1) Place an entry in the access_file (e.g.; ALL_FILE.CTL) of the form
  237.             Relative_DIR_NAME/*    A_Privilege
  238.       For example:
  239.              ROCKETS/*    ROCKETEERS
  240.        (...to access (relative) selectors beginning with ROCKETS/, the client 
  241.            must have a  ROCKETEERS  priviliege).
  242.  
  243.    2) Place an entry in the USERS_FILE (e.g.; USERS.IN) of the form:
  244.            username  password  privilege_list
  245.       For example:
  246.            OBRIEN  JORDIX2  ROCKETEERS
  247.        (.. User OBRIEN, with password JORDIX2, has a ROCKETEERS privilege).
  248.  
  249.    3) Set ALLOW_ACCESS="NO" (in INITFILT.80)
  250.       (... SRE-Filter will check privileges for all requests).
  251.  
  252.    4) you might want to add a
  253.          *  *
  254.      entry to the ACCESS_FILE file to signal "all other files/directories
  255.      are open access".
  256.  
  257.    Summarizing this example:
  258.      When the client asks for anything in the ROCKETS subdirectory
  259.      (of your GoServe data directory), SRE-Filter will challenge the user
  260.      for a username and password.  If the client enters a username
  261.      with the correct privileges (such as OBRIEN), he will be allowed entry.
  262.  
  263.    Notes:
  264.       *  If CHECKLOG='ALWAYS', SRE-Filter will only "re-challenge"
  265.          the client if his initial logon privileges did NOT contain a
  266.          matching privilege.
  267.       *  The simple mode SRE-Filter configurator can be used to add
  268.          (and remove) both SEL-specific access controls and
  269.          username/password entries.
  270.  
  271. * What are "client privileges" and "resource privileges" ?
  272.  
  273.     SRE-Filter uses "privileges" to provide flexibility and brevity
  274.     when assigning (and determining)  access rights.
  275.  
  276.     "Client privileges" are assigned to clients in a variety of
  277.     fashions (typically as part of their username/password
  278.     authentication).  In a sense, "client privileges" can be thought of
  279.     as shorthands for "groups of users".  In fact, one could simply
  280.     define the client's username as a (or as the only) privilege
  281.     (the ADD_USER_NAME variable is used for just that purpose!).
  282.  
  283.     The point is that by allowing multiple privileges per username,
  284.     a given client can be placed in many different groups of users.
  285.  
  286.     "Resource privileges", contained in SEL-specific access
  287.     control entries (in the ACCESS_FILE), refers to these "client privileges".
  288.     Resource privlieges can be thought of as a list of
  289.     "groups of users".  In the extreme case of each username
  290.     having a single privilege (equal to her username), the "resource
  291.     privileges" list the acceptable users!
  292.  
  293.     The use of REALMs can further augment the resource privilege list.
  294.     Each REALM is associated with it's own list of privileges.
  295.     REALM information, when specified for a particular SEL-specific access
  296.     control entry, augments the entries "own" privileges with the
  297.     "resource privileges list" associated with this REALM.
  298.  
  299.     In comparison to the HTACCESS method:
  300.        * The PASSWD.LST file is akin  to SRE-Filter's USERS.IN file
  301.          (albeit one that's directory specific); but with each entry
  302.          (in PASSWD.LST) assigned just an "own name" client privilege.
  303.        * The GROUPS.LST file is akin to a privilege, with each entry
  304.          in GROUPS.LST dictating which users have the "groupname" privilege.
  305.        * There does not seem to be a corollary to the "realm specific
  306.          resource privileges list".
  307.  
  308. * What's the difference between REALMS and privileges?
  309.  
  310.   For reasons both inertial and sensible, SRE-Filter's SEL-specific access
  311.   control method is based on the notion of  "privileges".  Basically,
  312.   a "client's privileges" are compared to a "resource privileges", and if
  313.   they match (as discussed above), access is granted.
  314.  
  315.   In contrast, other servers use the notion of the REALM -- where resources
  316.   are assigned to different REALMS on the server.  The client is then granted
  317.   access to these realms on as-needed basis.
  318.  
  319.   So, one could think of "resource privileges" as a list of REALMS that a
  320.   resource belongs to, and the "client privileges" as the REALMS that a client
  321.   has access rights to.
  322.  
  323.   But the astute reader might ask: then what are SRE-Filter's SEL-specific
  324.   REALMS?  Basically,  SRE-Filter's SEL-specific realms have two purposes:
  325.       1) They are sent to the client's browser when authorization is requested.
  326.          The browser will display this realm, and will cache responses by
  327.          server/realm.
  328.       2) As a shorthand for a "set of resource privileges".
  329.          By using this shorthand, you might be able to save some tedious entry
  330.          of long lists of "resource privileges". Note that !REALM entries in
  331.          the access control file are used to create these  "sets of resource
  332.          privileges".
  333.  
  334.   Perhaps we should have called the SRE-Filter SEL-specific realms  "displayed
  335.   REALMS", or "super-Realms"?
  336.  
  337. * I'm still confused about these privilege things?
  338.  
  339. It's actually simpler then it reads, especially if you don't need the
  340. fancier features. Let's sketch out a path to usefulness:
  341.     1) Use the simple-mode configurator to add a set of users.
  342.        For each user, you provide a username, password, and a
  343.        list of client privileges.
  344.     2) Use the simple-mode configurator to create "SEL-specific"
  345.        access-control entries. For each entry you'll specify the request
  346.        string (perhaps ending with a *), a list of resource
  347.        privileges, and an (optional) realm.
  348.  
  349. That's all you have to do -- user's with a "client privilege" that
  350. matches ANY ONE of a "selector's" resource privileges will be granted
  351. access rights to it.  If they haven't entered a username/password
  352. before hitting a protected server resource, the (optional) realm will be
  353. displayed on their browser's authorization screen.
  354.  
  355. * How can I limit the capabilities of different users of my server?
  356.  
  357.    The use of "SEL-specific" permissions allows one to control what
  358.    capabilities of the server are avaiable to different users.
  359.    Of particular interest are the following permissions:
  360.         NO_SSI : All server-side includes will be suppressed
  361.         NO_SSP : All server side processing will be suppressed
  362.         NO_CODE: INTERPRET CODE and SELECT keyphrases will be
  363.                   suppressed (these are "in-document" executable
  364.                   statements).
  365.    Note that these permissions are applied on a "SEL-specific" basis.
  366.    Thus, a given client may have "server side include" privileges
  367.    on some parts of your web-site, but not on other parts.
  368.  
  369.  
  370. * How can I prevent other web sites from using images stored on our server?
  371.  
  372.   If other sites are using your server to "store" files, such as interesting
  373.   .GIFs for use as in-line images, you may find this annoying.  For example,
  374.    you may maintain a publicly accessbile clip-art collection, which you
  375.    are happy to give away.  However, you don't want lazy websters to
  376.    use inline images that point to the files on your server.
  377.  
  378.    To preclude such sneaky tricks, you should use the "additional privileges"
  379.    facility of SRE-Filter.  Basically, you  issue a short-term
  380.    client privilege to all clients who "visit" your site (say, who
  381.    loads up the welcome screen for your clip-art collection).
  382.    This short-term client privilege is then required for all
  383.    requests for the actual clip-art files.  Thus, a request coming out of
  384.    the blue (with no prior request for  the "welcome" screen) will NOT
  385.    be assigned the short-term privileges, and access will be denied.
  386.  
  387.    The following outlines what you need to  implement the above:
  388.      *) Assume you have a /CLIPART directory, with lots of .GIF files in it.
  389.     **) Assume that your "welcome to clipart" page is called
  390.         /CLIPART/HELLO.HTM
  391.      1) Set SRE-Filter's variables:
  392.                  CHECK_ADD_PRIVS='YES'
  393.                  ALLOW_ACCESS='NO'
  394.                  ACCESS_FAIL_FILE=1
  395.         (you will have to hand-edit INITFILT.80 to change CHECK_ADD_PRIVS
  396.          and ACCESS_FAIL_FILE. Note that any non-0 value of ACCESS_FAIL_FILE
  397.          will do)
  398.      2 Add the following entries to your ALL_FILE.CTL file
  399.           /CLIPART/HELLO.HTM *
  400.           /CLIPART/*.GIF  !GETCLIP , , , -1
  401.        (the -1 signals "do NOT ask for authorization in event of failure")
  402.      3) Add the following line to /CLIPART/HELLO.HTM
  403.            <!-- INTERPRET FILE ADDPRIVS.RXX  GETCLIP , 30 -->
  404.  
  405.    That's it!  You might want to add a * * line to ALL_FILE.CTL (assuming
  406.    your site is otherwise open access).
  407.  
  408.    For further discussion of "dynamic privileges", see ADDPRIVS.DOC
  409.  
  410. * What are the server side include capabilities of SRE-Filter?
  411.  
  412.    A major advantage of SRE-FILTER is the ease with which a variety
  413.    of Server Side Includes  (SSIs) can be invoked-- just by adding special
  414.    keyphrases to your HTML document. Even better, these server side
  415.    includes are processed recursively -- so a server side include
  416.    can invoke further server side includes.
  417.  
  418.    SRE-Filter supports two classes of server side includes, instances of
  419.    which can be freely intermingled in your documents:
  420.  
  421.        i) The SRE-FILTER syntax.
  422.           The SRE-Filter syntax supports a variety of server side includes,
  423.           such as:
  424.             a) Inclusion of a file
  425.             b) Inclusion of a set of "dynamic variables" (such as time/date)
  426.             c) Inclusion of user defined "static variables"
  427.             d) Execution of a REXX program, with inclusion of "QUEUED"
  428.                output
  429.             e) SPECIAL Feature: Exclusion of a portion of a document,
  430.                based on the results of user written REXX code
  431.             f) Headers and Footers can be added to all documents.
  432.  
  433.        ii) The NCSA HTTPD syntax.
  434.            The NCSA HTTPD syntax is supported by SRE-Filter.  It overlaps
  435.            largely with the SRE_Filter syntax, with a few extra file-information
  436.            and time/date display features, and a CGI execution capacity.
  437.            More importantly, it's something of a standard.
  438.            For more information on the NCSA HTTPD server side includes,
  439.            check out http://hoohoo.ncsa.uiuc.edu/docs/tutorials/includes.html
  440.  
  441. * What's is the SSI-Cache?
  442.  
  443.    A new feature of SRE-Filter is the ability to "intelligently" cache
  444.    documents that contain server-side includes.  In simple cases,
  445.    these cached entries can be sent to the client "as is" -- relieving
  446.    the server of the need to reprocess the "server side includes".  Needless
  447.    to say, this can yield major performance advantages.
  448.  
  449.    The "intelligently" refers to those not-so-simple cases where the server
  450.    side includes are "dynamic".  "Dynamic" server side includes are items that
  451.    change over time, client, and circumstance.   A few obvious examples
  452.    include the current time, the "number of hits", and the client's IP address.
  453.    Obviously, one can't cache-return dynamic server side includes "as is".
  454.  
  455.    SRE-Filter solves this dilemna by "partially caching".  Basically, "static"
  456.    includes are performed (such as file INCLUDES), and placemarkers are
  457.    created for the "dynamic" includes.  This can substantially diminish the
  458.    workload, especially in cases where large file include (such as a standard
  459.    menu bar) are combined with minor dynamic includes (such as the current
  460.    "hit"). If you are still curious, SSICACHE.HTM contains a more detailed
  461.     discussion.
  462.  
  463.  
  464. * Can I use cookies with GoServe and SRE-Filter?
  465.  
  466.    The short answer is YES -- the 'HEADER ' GoServe "return code",
  467.    and the REQFIELD() function can be used to read and write cookies.
  468.  
  469.    SRE-Filter offers a few conveniences when processing cookies:
  470.         *) The INTERPRET "keyphrase" of SRE-Filter provides a convenient
  471.            means of reading and creating cookies; and of changing
  472.            the contents of document based the values of the cookies.
  473.         *) SREF_GET_COOKIE, a "macrospace" procedure provided with SRE-Filter,
  474.            facilitates "cookie extraction".
  475.  
  476.    Notes:
  477.      *  A good description of cookies can be found at:
  478.           http://home.netscape.com/newsref/std/cookie_spec.html
  479.      *  A short example of how SRE-Filter works with cookies can be found
  480.         in SAMPCOOK.HTM and SAMPCOOK.RXX
  481.  
  482.  
  483. * I am having trouble with uploads, what should I do?
  484.  
  485.  
  486.   SRE-Filter's implementation of "file uploads" requires
  487.   the use of an HTML document that contains a special type
  488.   of  <FORM>. This should be constructed as:
  489.  
  490.       <FORM enctype="multipart/form-data" ACTION="/put_file" METHOD="post">
  491.            Some stuff here:
  492.       <INPUT TYPE="file"  name="userfile" value="filename.ext">
  493.            More stuff
  494.       </FORM>
  495.  
  496.   For an example of such a  document, you can look at the
  497.  "PUT_FILE" portion of the UPLOAD.HTM file that comes with SRE-Filter.
  498.  
  499.   In addition, an HTML 3.x  aware browser (netscape 2.01 and above),
  500.   that knows how to properly deal with such <FORM>s, has to upload this
  501.   document.
  502.  
  503.   But before you start, you should check the following variables in
  504.   your INITFILT.80 file (or you can use SRE-Filter intermediate mode
  505.   configurator).
  506.  
  507.        UPLOAD_DIR :Change this to your desired "upload directory:
  508.             Example: UPLOAD_DIR = 'g:\GOSERV\upload '
  509.  
  510.   These next are automatically set upon installation, and are probably
  511.   okay; but you might want to check them just for fun.
  512.         UPLOAD_MINFREE  : Minimum space (in Kbytes) that must exist on
  513.                           your disk after upload
  514.                  Example: UPLOAD_MINFREE= 20000
  515.  
  516.         UPLOAD_MAXSIZE  : Maximum size of file upload (in Kbytes)
  517.                  Example: UPLOAD_MAXSIZE=1000
  518.  
  519.              UPLOAD_LOG :  Location of a "log" file, a short note on
  520.                            recieved uploads are written here.
  521.                  Example:UPLOAD_LOG = 'g:\GOSERV\UPLOAD\UPLOAD.LOG '
  522.  
  523.   With these setting in place, with your HTML document ready to rock
  524.   (again, see UPLOAD.HTM for an example), and with your client running
  525.   NetScape 2.01; everything should be ready to go!?
  526.       That is, when the client requests this form, Netscape gives
  527.       her a file-browse box. When the form is submitted, Netscape
  528.       appends the file, and SRE-Filter writes it to a file name
  529.  
  530.   <Alas> GoServe seems to have intermittent problems with these uploads!
  531.    The following settings seem to help, sometimes (as does use of
  532.    GoServe ver 2.50):
  533.      1) double click on the GoServe icon
  534.      2) Select the OPTIONS  menu
  535.      3) Select the LIMITS tab
  536.      3) Change the Connection Maintain to some  positive value (say, 15).
  537.         The proper value should be determined by experimentation, and
  538.         may depend on the size of files being transfered.
  539.      4) You may also want to go to page 2 of this tab, and change the
  540.         "body data size" variable (to the largest size you expect to recieve).
  541.         NOTE THAT GOSERVE SEEMS TO HAVE A 1M LIMIT ON UPLOADS.
  542.  
  543.                       >>>>>  Reviewing:   <<<<<<<
  544.  
  545.   1) Check your INITFILT.80 settings (especially the UPLOAD_DIR parameter)
  546.   2) Create an HTML document with a special <FORM> element
  547.      (see UPLOAD.HTM for an example)
  548.   3) You might need to change some Goserve settings
  549.   4) Request your html document with netscape 2.01 (other browsers
  550.      might work.  .. but WebEx  1.1d does NOT understand this type of FORM
  551.      element)
  552.  
  553.   By the way, UPLOAD.HTM contains a discussion on how to specify the
  554.   filename that SRE-Filter should use when saving the file.
  555.   You may also want to look at SREFILTR.HTM for further discussion  of
  556.   the PUT_FILE facility of SRE-Filter.
  557.  
  558.  
  559. * What are SRE-Filter's virtual directories?
  560.  
  561.     By default, SRE-Filter will match a request selector to a file in the 
  562.     "GoServe data directory".  While a good security feature (files not in or
  563.      under the GoServe data directory are inaccessible), this can be an 
  564.      inconvenience.
  565.  
  566.     To remedy this inconvenience, one can define "virtual directories"
  567.  
  568.     Basically, SRE-FILTER will compare the starting portion of the client's
  569.     request to see if it matches one of your virtual directory entries. If it
  570.     does, the target directory listed in the matching entry is used
  571.     (instead of the data directory).
  572.  
  573.     Thus, you can make available a wide, but controllable, set of
  574.     directories (on or LAN accessible from) your server.
  575.  
  576.     Furthermore, virtual directories can point to "remote" directories on
  577.     other http servers --  SRE-Filter will attempt to retrieve the file
  578.     from the remote server, without using a redirection!
  579.  
  580.     For details on the use of the virtual directories, see the sample
  581.     VIRTUAL_FILE (VIRTUAL.IN). Or, you can use the configurator!
  582.  
  583.  
  584.     Note: Compared to Don Meyer's GOHTTP filter:
  585.          * GOHTTP's use of "aliases" corresponds to SRE-Filter's use of
  586.            "virtual directories",
  587.          * GOHTTP's use of "redirection" (via the REDIRECT.LST files)
  588.            corresponds to  SRE-Filter's use of "aliases".
  589.  
  590.     An example of the use of virtual directories:
  591.          i) Assume that the Goserve data directory is D:\WWW
  592.         ii) Assume you want to provide access to the following files;
  593.                 D:\WWW\TELLME.HTM, D:\WWW\BIRDS\PARROT.HTM,
  594.                 E:\SOUND\NATURE\CHIRP.WAV, E:\SOUND\NATURE\MORE\TWEET.WAV,
  595.                 E:\PHOTOS\SKY\FLYING.JPG
  596.         iii) Two entries should be included in VIRTUAL.IN
  597.                   NATURE/   E:\SOUND\NATURE*
  598.                   PHOTOS2/   E:\PHOTOS\SKY*
  599.  
  600.          Given i,ii, and iii; the following links can be used
  601.                  HTML anchor      ---> points to --->   file
  602.               href="/TELLME.HTM"              D:\WWW\TELLME.HTM
  603.               href="/BIRDS/PARROT.HTM"        D:\WWW\BIRDS\PARROT.HTM
  604.               href="/NATURE/CHIRP.WAV"         E:\SOUND\NATURE\CHIRP.WAV
  605.               href="/NATURE/MORE/TWEET.WAV"    E:\SOUND\NATURE\MORE\TWEET.WAV
  606.               href="/PHOTOS2/FLYING.JPG"       E:\PHOTOS\SKY\FLYING.JPG
  607.  
  608.  
  609. * How do I redirect a request?
  610.  
  611.    One of the strengths of SRE-Filter is the variety of redirection
  612.    mechanisms it offers, where redirection implies "sending the client
  613.    a file that is not a direct mapping of the request selector.  Redirection
  614.    has two general classes: remote and local.
  615.  
  616.     "Remote" redirection, which  is what most of the literature simply
  617.     calls redirection, involves telling the client's browser that
  618.     "the url you have been requested has been moved to xxxx", where xxxx may
  619.     be any URL  -- it need not be on the same server, and it need not have
  620.     the same name.
  621.  
  622.     To do remote redirection, you need to add an entry to the list of aliases
  623.     contained in the ALIAS_FILE (ALIASES.IN), either by editing with your
  624.     favorite text editor, or by using the configurator.
  625.  
  626.     For example, an entry (in the alias-file) of
  627.          whatgot  http://www.mine.org/dir1/index1.htm
  628.     would cause the server to send back a "302" response to the client's
  629.     browser whenever a request for "whatgot" arrives.  This 302 response,
  630.     would instruct the client's browser to automatically request
  631.           http://www.mine.org/dir1/index1.htm.
  632.  
  633.  
  634.    "Local" redirection is handled solely by SRE-Filter, and involves
  635.    directly modifying the "request selector."
  636.    SRE-Filter has a number of methods of specifying "local redirection",
  637.    such as the DEFAULT, AUTO_NAME, NOEXT_TYPE variables, and the
  638.    use of entries (in the ALIAS_FILE) of the form:
  639.          whatgot   dir1/index.htm.
  640.    Local redirections actually involve textual substitution (after SRE-Filter
  641.    has recieved the request). Among other advantages, this gives you quite a
  642.    bit of control over how "SRE-Filter facilities, and external procedures"
  643.    percieve the request.
  644.  
  645.   Notes:
  646.  
  647.    * A CAUTION on local redirection and partial urls:
  648.        When using aliases for "local redirection", partial URL resolution by
  649.        the client's browser may have unexpected consequences. See the
  650.        discussion of "local  vs remote redirection" in INITFILT.DOC for details!
  651.  
  652.    * On Using HTACCESS files for redirection:
  653.        In addition to the use of the ALIAS_FILE, the REDIRECTFILE parameter
  654.        of HTACCESS files can be used for "directory specific" redirections
  655.        (see the description of the HTACCESS_FILE variable, in INITFILT.DOC,
  656.        for more details).
  657.  
  658.     * Compared to Don Meyer's GOHTTP filter:
  659.          * GOHTTP's use of "aliases" corresponds to SRE-Filter's use of
  660.            "virtual directories",
  661.          * GOHTTP's use of "redirection" (via the REDIRECT.LST files)
  662.            corresponds to  SRE-Filter's use of "aliases".
  663.  
  664. * Can I customize SRE-Filter responses.
  665.  
  666.   In a number of circumstances, SRE-Filter will generate an error or status
  667.   response. For example, if a request file does not exist, or if a client
  668.   does not have access rights to a file, SRE-Filter will send a somewhat terse
  669.   response (but at least it's not a totally terse "401 Unauthorized"
  670.   displayed all by it's self)!
  671.  
  672.   Currently, you can customize a few of these responses (for details,
  673.   see the descriptions in INITFILT.DOC):
  674.  
  675.      No file found:
  676.        The NOT_FOUND_URL parameter can be assigned a
  677.        short string, which will be displayed in the middle of a
  678.        generic message.  Alternatively, you specify a special
  679.        "not found" response file (typically, an HTML document
  680.        that you create)
  681.  
  682.      Logon denied:
  683.         SRE-Filter can either reprompt the client for a different username
  684.         and password, or it can send her a custom written response
  685.         file.  This file's name is set with the LOGON_FAIL_FILE.
  686.  
  687.      Access to a server resource denied:
  688.           If a request is denied due to insufficient "SEL-specific" privileges,
  689.           SRE-Filter can either reprompt the client for a different username,
  690.           or it can send her a custome written response file.  This default
  691.           name of this file is set with the ACCESS_FAIL_FILE parameter.
  692.           In addition, you can specify "SEL-specific accesss failure response
  693.           files" -- see the descriptions of the ACCESS_FILE (in SREFILTR.HTM,
  694.           or in the sample ALL_FILE.CTL file) for details on this advanced
  695.           option.
  696.  
  697. * How does SRE-Filter deal with multiple "wildcard" matches.
  698.  
  699.    When SRE-Filter attempts to match a selector to an "alias", "virtual 
  700.    directory",  or "access control entry", it is possible that several entries
  701.    will be "wildcard" matches.  To deal with such possiblities, the following
  702.    rules are used:
  703.      1) Exact matches take precedence
  704.      2) The wildcard match with the "longest portion before the *"
  705.         is used.
  706.      3) In case of ties in step 2, the match with the "longest portion after
  707.          the *" is used.
  708.      Thus, given a request for FOOD/FRUIT/ORANGES.HTM,
  709.      the order (with first being chosen before last) is:
  710.                FOOD/FRUIT/ORANGES.HTM  (the exact match)
  711.                FOOD/FRUIT/*
  712.                FOOD/*.HTM          (more characters after the *)
  713.                FOOD/*
  714.      (these 4 entries can appear in any order, with no  effect on precedence).
  715.  
  716. * How can I record the number of hits I get?
  717.  
  718.   SRE-Filter provides a wide variety of tools for recording the number
  719.   of hits you recieve. These include:
  720.  
  721.      1) The RECORD_ALL_FILE. The RECORD_ALL_FILE is used to record
  722.         the number of times ALL of your files are requested (on a
  723.         file-by-file basis).  It does NOT record individual requests, nor
  724.         does it place a "number of hits" line into a requested document.
  725.         The RECORD_OPTION parameter of SRE-Filter is used to
  726.         turn this option on or off.
  727.      2) The COUNTER_FILE is used to record, and display, total hits
  728.         for explicit files. The COUNTER_FILE is accessed by the
  729.         <!-- REPLACE HITS --> SRE-Filter "server side include"
  730.         keyphrase (there are several variants of this keyphrase).
  731.      3) The SENDFILE_FILE is used to record files that are
  732.         transfered with SRE-Filter's SENDFILE facility.
  733.      4) COUNTER.RXX is used to track hits requests on a file-specific
  734.         basis, and can record individual requests (as well as
  735.         total requests). COUNTER.RXX  can be invoked as a server
  736.         side include (using a <!-- INTERPRET COUNTER.RXX  xxx -->
  737.         keyphrase), or it can be invoked by  SENDFILE.
  738.         Lastly, the output of COUNTER.RXX is highly configurable.
  739.      5) XCOUNT.CMD is a CGI-BIN script that generates
  740.         a simple odometer for specific files (it's meant to be
  741.         included as an in-line image).
  742.         JCOUNT.CMD is similar, but is called using an
  743.         <!-- #EXEC xxx --> style  server side include (both of
  744.         these are courtesy of Don Meyer).
  745.      6) The GOAUDIT.80 file contains tons of stuff, you can use it
  746.         (but you'll have to wade through a lot of verbiage).
  747.      7) SRE-Filter supports the common-log audit files, and there are
  748.         lots of tools out there for analyzing common-log files.
  749.  
  750.      For details on the above choices, see SREFILTR.HTM, INITFILT.DOC, and
  751.      COUNTER.DOC.  Power users will probably like COUNTER.RXX the best,
  752.      (and when used with SENDFILE, COUNTER.RXX can be used with any type
  753.      of file, not just HTML documents).
  754.  
  755.      One last point: A nice feature of the COUNTER_FILE and
  756.      RECORD_ALL_FILE is the ability to NOT augment the counter when
  757.      repetitive requests  (from the same client) are recieved --
  758.      check out the descriptions of the HIT_CACHE_LEN, HIT_CACHE_DURATION,
  759.      and HIT_OWNER_SUPPRESS variables in INITFILT.DOC
  760.      (note that COUNTER.RXX  has similar features).
  761.  
  762.  
  763.  
  764. * How can I speed up throughput?
  765.  
  766.   The best way to speed up throughput is to use the SREFQUIK.80 variant
  767.   of SRE-Filter.  SREFQUIK.80 is a very small filter, and is designed to
  768.   process "literal public_urls" quickly.   The benefits of SREFQUIK.80
  769.   are especially noticable under moderate to heavy loads, where it's small
  770.   memory requirements are most important.
  771.  
  772.   The use of SREFQUIK will never diminish functionality of SRE-Filter -- if
  773.   SREFQUIK can't handle a request, it just calls SREFILTR.80.  However,
  774.   this does add some extra overhead.  Therefore, SREFQUIK.80 is best
  775.   used when you can specify many "literal public_urls".
  776.  
  777.   For other speed up hints, see the introduction to INITFILT.DOC
  778.  
  779.  
  780. * How do I define new MIME media types?
  781.  
  782.   If you want define a new MIME media type (or link a non-standard extension
  783.   to a standard MIME media type), just edit the MEDIATYP.RXX file located in
  784.   the GoServe directory (the default version of MEDIATYP.RXX contains detailed
  785.   instructions).
  786.  
  787.   You may also wish to define a subset of the text/html files to be "server
  788.   side include capable".  To do this, you need to set the SSI_SHTML_ONLY
  789.   variable to 'YES', and edit the SSI_EXTENSIONS variable (at the top
  790.   of SREFILTR.80).
  791.  
  792.  
  793. * How can I prevent NetScape from reloading files too frequently?
  794.  
  795.   Certain browsers (NetScape seems to be the most stringent about this)
  796.   are quite serious about reloading "expired" documents WHENEVER you
  797.   refresh them.   That is, not only will such documents be loaded afresh
  798.   upon the first request of a session, but even if you "back button" to
  799.   it, Netscape will reload it!
  800.  
  801.   There are many cases where SRE-Filter (actually, GoServe by default) will
  802.   return a document with an "immediate expire" (i.e.; documents
  803.   with server side includes, and results of CGI-bin scripts).  Hence,
  804.   this "feature" of NetScape can be quite annoying.
  805.  
  806.   To alleviate this annoyance, you can set the FIX_EXPIRE variable to
  807.   a "time delay".  When this time delay is greater then 0, the
  808.   expiration date will be augmented (correctly accounting for
  809.   new-dates and GMT).  This eliminates the over zealous refresh
  810.   activity of NetScape, but retains the "don't keep this
  811.   temporary file around forever" notion.
  812.  
  813.   Further details are contained in the description of the FIX_EXPIRE
  814.   variable in INITFILT.DOC.
  815.  
  816.  
  817. * What are the SRE-Filter add-ons?
  818.  
  819.    As an alternative to the CGI-BIN script interface, one can
  820.    write REXX routines that are called directly by SRE-Filter,
  821.    without the somewhat convoluted use of environment strings
  822.    that CGI-BIN scripts depend on.
  823.  
  824.    Currently, there are several add-ons available for SRE-Filter.
  825.    These include:
  826.       FORUM: A  "news-group and list-server" discussion-group package
  827.         BBS: A full featured "web based bulletin board system"
  828.    GETAFILE: A  directory displayer, with user-settable display features
  829.        CALC: A character-mode scientific calculator with a web interface
  830.    SREFPRC1: The source code for the SRE-Filter macrospace routines
  831.    SRCHINX: A front-end (+ more) to the freeware SWISH search engine.
  832.  
  833.    Some new "SUPERUSER" additions:
  834.      VURECORD: View the Record_all_file, with several display options
  835.      _COMMAND: Issue OS/2 Commands to the server computer
  836.  
  837.  
  838.    These add-ons can be obtained from the SRE-Filter home page at
  839.    http://rpbcam.econ.ag.gov/srefilter.
  840.  
  841. --- End of document.
  842.